package reflect;

import reflect.ann.AutoRunClass;
import reflect.ann.AutoRunMethod;

/**
 * 测试反射机制
 */
@AutoRunClass
public class Human {
    private String name = "张三";
    private int age = 22;

    @AutoRunMethod
    public void sayHello(){
        System.out.println(name+":hello!");
    }

    public void sayHi(){
        System.out.println(name+":sayHi!");
    }
    public void playGame(){
        System.out.println(name+":打游戏!");
    }

    @AutoRunMethod(3)
    public void watchTV(){
        System.out.println(name+":看电视");
    }
}
